import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/view/Home.vue'
import EChartsAppreciate from '@/view/chen/EChartsAppreciate.vue'
import EChartsEvaluate from '@/view/chen/EChartsEvaluate.vue'
import StuEvaluate from '@/view/chen/StuEvaluate.vue'
import FootRecognize from '@/view/zheng/FootRecognize.vue'
import Table from '@/view/zheng/Table.vue'
import StuVote from '@/view/chen/StuVote.vue'
import StuResult from '@/view/chen/StuResult.vue'
import Evaluate2 from '@/view/xie/Evaluate2.vue'
import H from '@/view/xie/H.vue'
import Medal from '@/view/xie/Medal.vue'
import PersonalInfo from '@/view/xie/PersonalInfo.vue'
import LearnAnalyze from '@/view/xie/LearnAnalyze.vue'
import AppFinght from '@/view/zheng/AppFinght.vue'
import Task from '@/view/Task.vue'
import AiAssistant from '@/view/chen/AiAssistant.vue'
import GrowArchive from '@/view/zheng/GrowArchive.vue'


const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      children: [
        {
          path: '',
          name: 'H',
          component: H
        },
        {
          path: '/appreciate',
          name: 'EChartsAppreciate',
          component: EChartsAppreciate
        },
        {
          path: '/evaluate',
          name: 'EChartsEvaluate',
          component: EChartsEvaluate
        },
        {
          path: '/stu',
          name: 'StuEvaluate',
          component: StuEvaluate
        },
        {
          path: '/foot',
          name: 'FootRecognize',
          component: FootRecognize
        },
        {
          path: '/table',
          name: 'Table',
          component: Table
        },
        {
          path: '/stuVote',
          name: 'stuVote',
          component: StuVote
        },
        {
          path: '/stuResult',
          name: 'stuResult',
          component: StuResult
        },
        {
          path: '/evaluate2',
          name: 'evaluate2',
          component: Evaluate2
        },
        {
          path: '/medal',
          name: 'medal',
          component: Medal
        },
        {
          path: '/personalInfo',
          name: 'personalInfo',
          component: PersonalInfo
        },
        {
          path: '/learnAnalyze',
          name: 'learnAnalyze',
          component: LearnAnalyze
        },
        {
          path: '/appFinght',
          name: 'appFinght',
          component: AppFinght
        },{          path: '/course',          name: 'course',          component: Task        },{          path: '/task',          name: 'task',          component: Task        },{
          path: '/aiAssistant',
          name: 'aiAssistant',
          component: AiAssistant
        },{
          path: '/growArchive',
          name: 'growArchive',
          component: GrowArchive
        }


      ]
    },
  ],
  // 滚动条
  scrollBehavior() {
    return { top: 0 }
  }

})

export default router
